package com.qqtech.qquan.pub.model;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.enums.BizzLevel1Enum;
import com.qqtech.core.common.enums.BizzLevel2Enum;
import com.qqtech.core.common.util.StringUtil;

@SuppressWarnings("serial")
public class PubConcernVo extends PubConcern{
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
	/**业务创建人**/
	private java.lang.String bizzCreatorName;
	/** 业务内容 */
	private java.lang.String bizzContent;
	/** 业务图片多个以;号分开 */
	private java.lang.String bizzImg;
	public java.lang.String getBizzCreatorName() {
		return bizzCreatorName;
	}
	public void setBizzCreatorName(java.lang.String bizzCreatorName) {
		this.bizzCreatorName = bizzCreatorName;
	}
	public java.lang.String getBizzContent() {
		return bizzContent;
	}
	public void setBizzContent(java.lang.String bizzContent) {
		this.bizzContent = bizzContent;
	}
	public java.lang.String getBizzImg() {
		return bizzImg;
	}
	public void setBizzImg(java.lang.String bizzImg) {
		this.bizzImg = bizzImg;
	}
	
	/** 是否显示图片 **/
	public boolean getIsShowImg() {
		if (StringUtils.isNotBlank(this.getBizzImg())) {
			return true;
		} else {
			return false;
		}
	}
	
	public String getPathImgs() {
		if (StringUtil.isBlank(this.getBizzImg())) {
			return "";
		}
		String filePath = ";" + this.getFileDomain();
		String pathImgs = this.getBizzImg().replaceAll(";", filePath);
		return this.getFileDomain() + pathImgs;
	}
	
	public String getBizzTypeName(){
		if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.USER.getCode())){
			return "【用户】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.CIRCLE.getCode())){
			return "【圈子】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.COMMUNITY.getCode())){
			return "【社区】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.HOMEMAKING.getCode())){
			return "【家政】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.HOME.getCode())){
			return "【家庭】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.IDLE.getCode())){
			return "【闲置品】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.ACTIVITY.getCode())){
			return "【活动】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel1Enum.MALL.getCode())){
			return "【商城】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.USER_TOPIC.getCode())){
			return "【圈友动态】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.CIRCLE_TOPIC.getCode())){
			return "【圈子动态】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.COMMUNITY_MESSAGE.getCode())){
			return "【社区动态】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.HOME_MESSAGE.getCode())){
			return "【家庭幸福窝窝】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.IDLE_MESSAGE.getCode())){
			return "【交易信息】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.MALL_PRODUCT.getCode())){
			return "【商品】";
		}else if(getBizzType().equalsIgnoreCase(BizzLevel2Enum.QSHOP_SHOP.getCode())){
			return "【店铺】";
		} else{
			return "";
		}
	}
}